package com.aos.client;

import com.aos.entity.JWT;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "uaa-service-gov")
public interface GetUserTokenClient {
    @PostMapping(value = "/oauth/token")
    JWT getToken(
            @RequestHeader(value = "Authorization") String authorization,
            @RequestParam("grant_type") String type,
            @RequestParam("username") String username,
            @RequestParam("password") String password
    );

    @RequestMapping(value = "/oauth/revoke-token",method = RequestMethod.GET)
    String deletetToken(@RequestParam("access_token") String access_token);
}
